package com.wthink.newMain.newCamera

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.wthink.hzgj.service.DevService
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

class NewCameraViewmodel : ViewModel(){

    fun start(){
       fourCamera()
    }

    fun oneCamera() {
        val list = listOf("1")
        viewModelScope.launch(Dispatchers.IO) {
            DevService.setCamera(list)
        }
    }
    fun fourCamera() {
        val list = listOf("1","2","3","4")
        viewModelScope.launch(Dispatchers.IO) {
            DevService.setCamera(list)
        }
    }
    fun nineCamera() {
        val list = listOf("1","2","3","4","5","6","7","8","9")
        viewModelScope.launch(Dispatchers.IO) {
            DevService.setCamera(list)
        }
    }

    fun sixTeenCamera() {
        val list = listOf("1","2","3","4","5","6","7","8","9","10","11","12")
        viewModelScope.launch(Dispatchers.IO) {
            DevService.setCamera(list)
        }
    }
}